#include <QApplication>
#include <QLabel>
#include <QMovie>

int main(int argc, char **argv)
{
    QApplication a(argc, argv);

    QWidget w;
    w.resize(400,300);

    QLabel l1(&w);
    l1.setText("欢迎使用Qt");
    l1.resize(400,300);
    l1.show();

    QPixmap pix("./1.png");
    pix = pix.scaled(l1.size());
    l1.setPixmap(pix);

    QMovie *movie = new QMovie("./2.gif");
    l1.setMovie(movie);
    movie->start();

    w.show();
    return a.exec();

}
